package model

import "time"

type User struct {
	ID             string    `gorm:"primaryKey;column:id" json:"id"`
	ProfileID      string    `gorm:"column:profile_id" json:"profile_id"`
	Nickname       string    `gorm:"column:nickname;type:varchar(255)" json:"nickname"`
	Avatar         string    `gorm:"column:avatar;type:text" json:"avatar"`
	Description    string    `gorm:"column:description;type:text" json:"description"`
	FollowerCount  int       `gorm:"column:follower_count;default:0" json:"follower_count"`
	FollowingCount int       `gorm:"column:following_count;default:0" json:"following_count"`
	VideoCount     int       `gorm:"column:video_count;default:0" json:"video_count"`
	LikeCount      int       `gorm:"column:like_count;default:0" json:"like_count"`
	Verified       bool      `gorm:"column:verified;default:false" json:"verified"`
	Platform       string    `gorm:"column:platform;type:varchar(100)" json:"platform"`
	ProfileURL     string    `gorm:"column:profile_url;type:text" json:"profile_url"` 
	CrawledAt      time.Time `gorm:"column:crawled_at;type:datetime" json:"crawled_at"`
}

func (User) TableName() string {
	return "douyin_users"
}